using ZFramework;

namespace PaintAWorld
{
    public interface IChunkUpdateContent { }
    public struct WorldChunkUpdateEvent : IGameEvent
    {
        public Vec3I chunkPos;
        public IChunkUpdateContent content;
        public WorldChunkUpdateEvent(Vec3I chunkPos, IChunkUpdateContent ctx)
        {
            this.chunkPos = chunkPos;
            content = ctx;
        }
    }

    namespace ChunkUpdates
    {
        public struct TerrainUpdate : IChunkUpdateContent
        {
            public VoxelModel newModel;

            public TerrainUpdate(VoxelModel newModel)
            {
                this.newModel = newModel;
            }
        }

        public struct ConstructionUpdate : IChunkUpdateContent
        {
            public Vec3I localPos;
            public string constructionName;

            public ConstructionUpdate(Vec3I localPos, string name)
            {
                this.localPos = localPos;
                constructionName = name;
            }
        }
    }
}